/*############################### SCRIPT ###################################*\
|| Script: exportvbgallery.php                                              ||
|| Version: 0.9 beta                                                        ||
|| Date: 2010/05/30                                                         ||
|| by Luciano                                                               ||
\*##########################################################################*/

Experimental importer from PP7 to vBGallery
NO configuration required.

To run just copy the file exportvbgallery.php to your PP7 directory and call it with your browser.

Attention, it will only work IF:
you are admin in PP7 and in forums.
AND your forums integration in PP7 is working.. 
(it will NOT work if you have a standalone installation of PP7 NOT integrated in vbulletin!!!)

It is very basic, to import images do following.
STEP 1. call exportvbgallery.php from your main PP7 directory
STEP 2. Select source category in PP7 and destination category in vBGallery. (it will not delete any existing images in vbgallery)

STEP 3. run the import.

NOW this is important:
(go back in your browser and) 
STEP 4. Run import comments (this should import ratings also)

---------------

You are NOT done yet...
You only imported pp7 bigimages and comment and ratings..

Step 5: goto ACP->vbgallery->maintenance : Rebuild Image Sizes
there you select: Normal Images (NOT thumbnails)
and select the destination category in vbgallery.
RUN..
Step 6: When finished THEN do the same thing selecting thumbnails!

And then rebuild all possible counters.
You should now be done.

FINAL IMPORTANT STEP:
IF you are statisfied go back to exportvbgallery.php and run finalize ... 
IF you are NOT satisfied, you can undo the imports. (once undone, run finalize to remove all leftovers)

Its a little complicated, but it avoids errors and allows undo.
we tested on a big gallery with over 500.000 images. it worked..(but took a rather long time - the regeneration of normal images & thumbs)

Luc

PS: fixes were necessary in vbgallery to support big categories with over 50.000 images. rebuild image counters now works in these categories.

